//
//  StatusUpdater.h
//  ActiveDeck
//
//  Created by Laura McBride on 8/30/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GDataXMLNode.h"
#import "HttpRequest.h"


@interface StatusUpdater : NSObject {
    BOOL m_initialStatus;
    BOOL m_Updating;
    BOOL m_shouldUpdateStatus;
    
    HttpRequest *requestOB;
    
    GDataXMLElement *UpdaterAuthNode;
    
    NSString *loginXML;
    
    int m_CurrentSlide;
    
    NSNumber *upcomingSlideIndex;
    
    id _delegate; 
    
    NSString *initialStatusPath;
    NSString *subscriptionPath;
    NSString *channelFormat;
    
    NSString *m_Channel_ID;
}

@property (nonatomic, retain) HttpRequest *requestOB;
@property (nonatomic, retain) NSString *loginXML;
@property (nonatomic, retain) GDataXMLElement *UpdaterAuthNode;
@property (readwrite) BOOL m_initialStatus;
@property (readwrite) int m_CurrentSlide;
@property (readwrite) BOOL m_Updating;
@property (readwrite) BOOL m_shouldUpdateStatus;
@property (nonatomic, retain) NSNumber *upcomingSlideIndex;
@property (nonatomic, retain) NSString *initialStatusPath;
@property (nonatomic, retain) NSString *subscriptionPath;
@property (nonatomic, retain) NSString *channelFormat;
@property (nonatomic, retain) NSString *m_Channel_ID;

-(void)initialUpdater:(int)PresentationID
            loginInfo:(NSString *)loginInfo
             AuthNode:(GDataXMLElement *)AuthNode;

-(void)initialUpdater:(int)PresentationID
            loginInfo:(NSString *)loginInfo
             AuthNode:(GDataXMLElement *)AuthNode
        initialStatus:(BOOL)initialStatus;

-(void)changeSlide:(NSNumber *)slideIndex;
-(void)updateMessageID:(GDataXMLElement *) PresentationStatus
                docXML:(GDataXMLDocument *)docXML;
-(void)setDelegate:(id)delegate;
-(void)stop;
-(void)setUpdateStatus:(BOOL)shouldUpdate;
-(void)notifySlideChange;
@end


@interface NSObject(updateSlideDelegate)
- (void)changeSlide:(NSNumber *)slideIndex;
- (void)changeSlide:(NSNumber *)slideIndex pageID:(int)pageID;
- (int)GetSlideIndexByID:(int)SectionID;
- (int)SearchSectionIdex:(int)SectionID;
- (void)notifySlideChange;
- (void)resetIdleTimer;
- (BOOL)getIdleState;
@end
